<template>
  <div class="order-success-page">
    <van-nav-bar title="订单提交成功" left-arrow @click-left="$router.back()" />
    <div class="success-content">
      <div class="success-icon">
        <van-icon name="checked" size="60" color="#07c160" />
      </div>
      <h2 class="success-title">订单提交成功！</h2>
      <p class="success-message">感谢您的惠顾，我们将尽快处理您的订单</p>
      <div class="action-buttons">
        <van-button round block class="back-home-btn" @click="backToHome">
          返回首页
        </van-button>
      </div>
    </div>
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const backToHome = () => {
  router.push('/home')
}
</script>
<style scoped>
.order-success-page {
  background-color: #f7f7f7;
  min-height: 100vh;
   min-width: 78vh;
}

.success-content {
  padding: 30px 20px;
  text-align: center;
  background-color: #fff;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.success-icon {
  margin-bottom: 20px;
}

.success-title {
  font-size: 22px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 500;
}

.success-message {
  font-size: 15px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.order-info {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: left;
}

.back-home-btn {
  background-color: #fff;
  color: #333;
  border: 1px solid #ebedf0;
}

.success-icon {
  animation: bounceIn 0.6s;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }

  60% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}
</style>